import Vue from 'vue'
import App from './App'

// vuex
import store from './store'

import uView from '@/uni_modules/uview-ui'
// 引入uView提供的对vuex的简写法文件
Vue.prototype.$store = store

Vue.filter('distanceFormat', function(input) {
	let s = null
	input = parseFloat(input)
	if (input > 1000) {
		//    大于1000米时
		s = Math.floor(input / 1000 * 100) / 100;
		s = s + '公里'
	} else {
		//    小于1000米直接返回
		s = input.toFixed(2) + '米'
	}

	return s;
})


import noData from '@/components/no-data/index.vue'
Vue.component('noData', noData)

Vue.config.productionTip = false
App.mpType = 'app'
Vue.use(uView)
require('./common/props')

import mixin from './common/mixin'
Vue.mixin(mixin)

let vuexStore = require('@/store/$u.mixin.js');
Vue.mixin(vuexStore);

const app = new Vue({
	store,
	...App
})

// 引入请求封装
require('./utils/request/index')(app)

app.$mount()





